##!/usr/bin/env python3
# -*- coding: utf-8 -*-

import threading

loc = threading.local()


def change():
    loc.num = loc.num + 1
    print('%s in %s, num=%d' % (loc.name, threading.current_thread().name, loc.num))


def process(name, num):
    loc.name = name
    loc.num = num
    change()


t1 = threading.Thread(target=process, args=('man1', 1,), name=('thread1'))
t2 = threading.Thread(target=process, args=('man2', 5,), name=('thread2'))

t1.start()
t2.start()
t1.join()
t2.join()
